package com.yadang.activemq;

import org.apache.activemq.ActiveMQConnectionFactory;
import org.springframework.boot.r2dbc.ConnectionFactoryBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.jms.ConnectionFactory;

/**
 * @author: 亚当
 * @date: 2023年04月05日 21:56
 * @package: com.yadang.activemq
 * @Description: TODO
 */
@Configuration
public class MQConfig {
    @Bean
    public ConnectionFactory connectionFactory(){
        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory();
        connectionFactory.setBrokerURL("tcp://localhost:61616");
        connectionFactory.setPassword("admin");
        connectionFactory.setUserName("admin");
        return connectionFactory;
    }

}
